Skip to content

Resolve Drop calls #1467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Resolve Drop calls #1467

wants to merge 5 commits into from

Conversation

Nadrieril
Copy link
Collaborator

@Nadrieril Nadrieril commented May 18, 2025

This PR makes it so we gather the data needed to know what code is called on a drop terminator.

By default, this is best-effort: we translate a trait ref if we find one. This also adds a resolve_drop_bounds option (maybe this should be renamed) which adds T: Drop bounds to every possible generic parameter and associated type, which guarantees that we can find the right Drop impl.

The one thing that's missing is the implicit Drop impls (so-called "drop glue") that exist for ADTs without an explicit impl Drop; these are represented as DropData::Glue, and the corresponding MIR body is added to FullDef so it can be translated by charon.

@Nadrieril
Copy link
Collaborator Author

This is ready but based on #1477

@Nadrieril Nadrieril marked this pull request as ready for review May 28, 2025 11:10
@Nadrieril Nadrieril requested a review from a team as a code owner May 28, 2025 11:10
@Nadrieril Nadrieril requested a review from W95Psp May 28, 2025 11:11
@Nadrieril
Copy link
Collaborator Author

Charon failure is expected: this adds new variants to ImplExprAtom.

@Nadrieril
Copy link
Collaborator Author

I've rebased this, it's ready

Copy link
Collaborator

@W95Psp W95Psp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay.
That looks great, thank you!

@Nadrieril Nadrieril added this pull request to the merge queue Jun 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 4, 2025
@Nadrieril
Copy link
Collaborator Author

Could extract-mlkem be failing because of a hash change? If so how can I fix it?

@W95Psp
Copy link
Collaborator

W95Psp commented Jun 4, 2025

ah.. yes, that's very likely :(
Basically, those numbers are hardcoded in F* annotations blobs in Rust, so we have to edit those numbers directly there, in libcrux :/
Today is a bit busy on my side sadly

@Nadrieril Nadrieril mentioned this pull request Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants